package org.action.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.action.domain.entity.Action;
import org.action.domain.pojo.action.ActionDetails;
import org.action.domain.pojo.action.ActionList;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zafkiel
 * @since 2025-06-21
 */
@Mapper
public interface ActionMapper extends BaseMapper<Action> {
    @Select("select action.id,action.action_name,action.action_date,action.action_location,action.action_cover from action")
    List<ActionList> getAllActionList();

    @Select("select *from action_details where id=#{id}")
    ActionDetails getActionDetailsById(Integer id);
}
